/**
 * com.sunrise.dc.web.DataInitListener.java
 */
package com.mbmed.doctor.commons.web;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.springframework.web.context.support.WebApplicationContextUtils;
import com.mbmed.doctor.commons.utils.ContentUtils;

 /**
 * @file  DataInitListener.java
 * @author yangzhengxin(Jason)
 * @version 0.1
 * @todo	启动初始化类
 * Copyright(C), 2013-2014
 *			Shenzhen Coordinates Software Development Co., Ltd
 * History
 *   	1. Date: 2013-4-18
 *      	Author: yangzhengxin(Jason)
 *      	Modification: this file was created
 *   	2. ...
 */
public class DataInitListener implements ServletContextListener {
	
    public void contextDestroyed(ServletContextEvent sce) {

    }

    public void contextInitialized(ServletContextEvent sce) {
    	
        ContentUtils.APP_REAL_PATH = sce.getServletContext().getRealPath("/");          
        ContentUtils.ac=WebApplicationContextUtils.getRequiredWebApplicationContext(sce.getServletContext());

    	
        //启动flush 模块权限的线程，每5分钟刷新一次
//		if (FlushThread.count == 0) {
//			FlushThread ft = new FlushThread();
//			ft.start();
//		}
    }

}
